/**
 *====================================================
 * 文件名称: FinanceAbnormalActionApi.java
 * 修订记录：
 * No    日期				作者(操作:具体内容)
 * 1.    2015年11月21日			chenxy(创建:创建文件)
 *====================================================
 * 类描述：(说明未实现或其它不应生成javadoc的内容)
 */
package com.yuexunit.finance.project.action.v1;

import java.math.BigDecimal;
import java.util.Date;

import com.yuexunit.finance.context.FinVersion1;
import com.yuexunit.finance.project.action.v1.model.AbnormalBlame;
import com.yuexunit.finance.project.action.v1.model.AbnormalCasualty;
import com.yuexunit.finance.project.action.v1.model.AbnormalCorrective;
import com.yuexunit.finance.project.action.v1.model.AbnormalEquipment;
import com.yuexunit.finance.project.action.v1.model.AbnormalExpense;
import com.yuexunit.finance.project.action.v1.model.AbnormalRisk;
import com.yuexunit.finance.project.action.v1.model.AbnormalSurvey;
import com.yuexunit.finance.project.action.v1.model.input.AbnormalParams;
import com.yuexunit.finance.project.action.v1.model.input.AbnormalUpdateParams;
import com.yuexunit.finance.project.action.v1.model.output.AbnormalBlameDetail;
import com.yuexunit.finance.project.action.v1.model.output.AbnormalCasualtyDetail;
import com.yuexunit.finance.project.action.v1.model.output.AbnormalCorrectiveDetail;
import com.yuexunit.finance.project.action.v1.model.output.AbnormalDetail;
import com.yuexunit.finance.project.action.v1.model.output.AbnormalEquipmentDetail;
import com.yuexunit.finance.project.action.v1.model.output.AbnormalExpenseDetail;
import com.yuexunit.finance.project.action.v1.model.output.AbnormalLineInfo;
import com.yuexunit.finance.project.action.v1.model.output.AbnormalRiskDetail;
import com.yuexunit.finance.project.action.v1.model.output.AbnormalSurveyDetail;
import com.yuexunit.finance.project.action.v1.model.output.AbnormalTrackDetail;
import com.yuexunit.finance.project.action.v1.model.output.DetainedApplicationDetail;
import com.yuexunit.finance.project.action.v1.model.output.DetainedApplicationLineInfo;
import com.yuexunit.page.PageCriteria;
import com.yuexunit.page.PageList;
import com.yuexunit.web.annotation.Action;
import com.yuexunit.web.annotation.Parameter;
import com.yuexunit.web.annotation.Permission;

/**
 * @ClassName: FinanceAbnormalActionApi
 * @Description: 异常处理
 * @author chenxy
 * @date 2015年11月21日 下午3:04:29
 */
public interface FinanceAbnormalActionApi {

	@Permission
	@Action(version = FinVersion1.class, description = "创建扣货申请")
	@Parameter(name = "detainedId", description = "扣货申请ID")
	public String createDetainedApplication(
			@Parameter(name = "financeId", description = "融资信息ID") Long financeId,
			@Parameter(name = "applicantReson", description = "申请原因 系统参数ID=9") Integer applicantReson,
			@Parameter(name = "remark", description = "申请备注") String remark,
			@Parameter(name = "inventoryId", description = "扣货货箱") Long[] inventoryIds
	);

	@Permission
	@Action(version = FinVersion1.class, description = "取消扣货申请")
	public void cancelDetainedApplication(
			@Parameter(name = "detainedId", description = "扣货申请ID") Long detainedId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "同意扣货申请")
	public void consentDetainedApplication(
			@Parameter(name = "detainedId", description = "扣货申请ID") Long detainedId,
			@Parameter(name = "auditRemark", description = "审核备注") String auditRemark
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "拒绝扣货申请")
	public void opposeDetainedApplication(
			@Parameter(name = "detainedId", description = "扣货申请ID") Long detainedId,
			@Parameter(name = "disagreeReson", description = "拒绝原因 系统参数ID=9") Integer disagreeReson,
			@Parameter(name = "auditRemark", description = "审核备注") String auditRemark
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询扣货申请")
	public DetainedApplicationDetail inquireDetainedApplicationDetail(
			@Parameter(name = "detainedId", description = "扣货申请ID") Long detainedId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询扣货申请列表")
	public PageList<DetainedApplicationLineInfo> inquireDetainedApplicationPageList(
			@Parameter(name = "detainedIds", description = "扣货申请ID", nullable = true) Long[] detainedIds,
			@Parameter(name = "enterpriseId", description = "企业信息ID", nullable = true) Long enterpriseId,
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId,
			@Parameter(name = "applicationState", description = "申请状态 0:未知/1:未审批/2:同意/3:拒绝", nullable = true) Integer applicationState,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);

	//==============================================================================================================================================================//
	@Permission
	@Action(version = FinVersion1.class, description = "监管(理货)异常-返回异常信息表单数据-确认后再提交")
	public AbnormalDetail inquirePreTallyAbnormalInventory(
			@Parameter(name = "inventoryId", description = "货箱ID") Long inventoryId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "配送(签收)异常-返回异常信息表单数据-确认后再提交")
	public AbnormalDetail inquirePreDeliveryAbnormalInventory(
			@Parameter(name = "inventoryId", description = "货箱ID") Long inventoryId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "创建融资异常信息")
	@Parameter(name = "abnormalId", description = "异常ID")
	public String createAbnormal(AbnormalParams params);

	@Permission
	@Action(version = FinVersion1.class, description = "更新融资异常信息")
	public void updateAbnormal(AbnormalUpdateParams params);

	@Permission
	@Action(version = FinVersion1.class, description = "接受融资异常信息")
	public void confirmAbnormal(
			@Parameter(name = "abnormalId", description = "异常ID") Long abnormalId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "处理融资异常信息")
	public void processAbnormal(
			@Parameter(name = "abnormalId", description = "异常ID") Long abnormalId		
	);

	@Permission
	@Action(version = FinVersion1.class, description = "关闭融资异常信息")
	public void finishAbnormal(
			@Parameter(name = "abnormalId", description = "异常ID") Long abnormalId		
	);

	@Permission
	@Action(version = FinVersion1.class, description = "添加责任人处置-1")
	@Parameter(name = "abnormalBlameId", description = "责任人处置ID")
	public String createAbnormalBlame(AbnormalBlame params);

	@Permission
	@Action(version = FinVersion1.class, description = "确认责任人处置")
	public void consentAbnormalBlame(
			@Parameter(name = "abnormalBlameId", description = "责任人处置ID") Long abnormalBlameId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "责任人处置明细")
	public AbnormalBlameDetail inquireAbnormalBlameDetail(
			@Parameter(name = "abnormalBlameId", description = "责任人处置ID") Long abnormalBlameId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "添加人员伤亡信息-2")
	@Parameter(name = "abnormalCasualtyId", description = "人员伤亡信息ID")
	public String createAbnormalCasualty(AbnormalCasualty params);

	@Permission
	@Action(version = FinVersion1.class, description = "确认人员伤亡")
	public void consentAbnormalCasualty(
			@Parameter(name = "abnormalCasualtyId", description = "人员伤亡信息ID") Long abnormalCasualtyId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "人员伤亡明细")
	public AbnormalCasualtyDetail inquireAbnormalCasualtyDetail(
			@Parameter(name = "abnormalCasualtyId", description = "人员伤亡信息ID") Long abnormalCasualtyId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "添加设备损坏信息-3")
	@Parameter(name = "abnormalEquipmentId", description = "设备损坏信息ID")
	public String createAbnormalEquipment(AbnormalEquipment params);

	@Permission
	@Action(version = FinVersion1.class, description = "确认设备损坏")
	public void consentAbnormalEquipment(
			@Parameter(name = "abnormalEquipmentId", description = "设备损坏信息ID") Long abnormalEquipmentId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "设备损坏明细")
	public AbnormalEquipmentDetail inquireAbnormalEquipmentDetail(
			@Parameter(name = "abnormalEquipmentId", description = "设备损坏信息ID") Long abnormalEquipmentId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "添加异常调查-4")
	@Parameter(name = "abnormalSurveyId", description = "调查表ID")
	public String createAbnormalSurvey(AbnormalSurvey params);

	@Permission
	@Action(version = FinVersion1.class, description = "确认异常调查")
	public void consentAbnormalSurvey(
			@Parameter(name = "abnormalSurveyId", description = "调查表ID") Long abnormalSurveyId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "异常调查明细")
	public AbnormalSurveyDetail inquireAbnormalSurveyDetail(
			@Parameter(name = "abnormalSurveyId", description = "调查表ID") Long abnormalSurveyId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "添加整改总结-5")
	@Parameter(name = "abnormalCorrectiveId", description = "整改总结ID")
	public String createAbnormalCorrective(AbnormalCorrective params);

	@Permission
	@Action(version = FinVersion1.class, description = "确认整改总结")
	public void consentAbnormalCorrective(
			@Parameter(name = "abnormalCorrectiveId", description = "整改总结ID") Long abnormalCorrectiveId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "整改总结明细")
	public AbnormalCorrectiveDetail inquireAbnormalCorrectiveDetail(
			@Parameter(name = "abnormalCorrectiveId", description = "整改总结ID") Long abnormalCorrectiveId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "添加异常费用信息-6")
	@Parameter(name = "abnormalExpenseId", description = "异常费用信息ID")
	public String createAbnormalExpense(AbnormalExpense params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "确认异常费用信息")
	public void consentAbnormalExpense(
			@Parameter(name = "abnormalExpenseId", description = "异常费用信息ID") Long abnormalExpenseId	
	);

	@Permission
	@Action(version = FinVersion1.class, description = "异常费用明细")
	public AbnormalExpenseDetail inquireAbnormalExpenseDetail(
			@Parameter(name = "abnormalExpenseId", description = "异常费用信息ID") Long abnormalExpenseId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "添加风险信息-7")
	@Parameter(name = "abnormalRiskId", description = "异常风险ID")
	public String createAbnormalRisk(AbnormalRisk params);

	@Permission
	@Action(version = FinVersion1.class, description = "确认风险信息")
	public void consentAbnormalRisk(
			@Parameter(name = "abnormalRiskId", description = "异常风险ID") Long abnormalRiskId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "确认风险信息")
	public void settlementAbnormalRisk(
			@Parameter(name = "abnormalRiskId", description = "异常风险ID") Long abnormalRiskId,
			@Parameter(name = "settlementState", description = "状态") Integer settlementState,
			@Parameter(name = "settlementMeasure", description = "处理措施") String settlementMeasure,
			@Parameter(name = "settlementDetail", description = "处理详情") String settlementDetail,
			@Parameter(name = "operator", description = "处理人") String operator,
			@Parameter(name = "operatorTime", description = "处理时间") Date operatorTime
	);

	@Permission
	@Action(version = FinVersion1.class, description = "风险信息明细")
	public AbnormalRiskDetail inquireAbnormalRiskDetail(
			@Parameter(name = "abnormalRiskId", description = "异常风险ID") Long abnormalRiskId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "风险信息列表")
	public PageList<AbnormalRiskDetail> inquireAbnormalRiskPageList(
			@Parameter(name = "abnormalRiskId", description = "异常风险ID", nullable = true) Long abnormalRiskId,
			@Parameter(name = "settlementState", description = "处理状态 0:未处理/1:已处理", nullable = true) Integer settlementState,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);

	@Permission
	@Action(version = FinVersion1.class, description = "异常货箱处理-正常监管")
	public void normalAbnormalInventory(
			@Parameter(name = "abnormalInventoryId", description = "异常货箱ID") Long abnormalInventoryId,
			@Parameter(name = "reson", description = "处理原因") Integer reson,
			@Parameter(name = "handleDate", description = "处理时间") String handleDate,
			@Parameter(name = "handleRemark", description = "处理说明") String handleRemark
	);

	@Permission
	@Action(version = FinVersion1.class, description = "异常货箱处理-融资额度调整")
	public void adjustAbnormalInventory(
			@Parameter(name = "abnormalInventoryId", description = "异常货箱ID") Long abnormalInventoryId,
			@Parameter(name = "inventoryFinanceAmount", description = "调整融资额度") BigDecimal inventoryFinanceAmount,
			@Parameter(name = "reson", description = "处理原因") Integer reson,
			@Parameter(name = "handleDate", description = "处理时间") String handleDate,
			@Parameter(name = "handleRemark", description = "处理说明") String handleRemark
	);

	@Permission
	@Action(version = FinVersion1.class, description = "异常货箱处理-换箱")
	public void exchangeAbnormalInventory(
			@Parameter(name = "abnormalInventoryId", description = "异常货箱ID") Long abnormalInventoryId,
			@Parameter(name = "targetCaseNumber", description = "调换箱号") String targetCaseNumber,
			@Parameter(name = "targetFacingSlip", description = "调换铅封号") String targetFacingSlip,
			@Parameter(name = "targetFacingSlipNext", description = "调换铅封号2") String targetFacingSlipNext,
			@Parameter(name = "exchangeDate", description = "调换时间") String exchangeDate,
			@Parameter(name = "logisticsCompanyId", description = "物流公司ID-再次理货物流公司") Long logisticsCompanyId,
			@Parameter(name = "logisticsCompanyName", description = "物流公司名称-再次理货物流公司") String logisticsCompanyName
	);

	@Permission
	@Action(version = FinVersion1.class, description = "异常货箱处理-退货")
	public void returnAbnormalInventory(
			@Parameter(name = "abnormalInventoryId", description = "异常货箱ID") Long abnormalInventoryId,
			@Parameter(name = "reson", description = "处理原因") Integer reson,
			@Parameter(name = "handleDate", description = "处理时间") String handleDate,
			@Parameter(name = "handleRemark", description = "处理说明") String handleRemark
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "异常货箱处理-处置")
	public void handleAbnormalInventory(
			@Parameter(name = "abnormalInventsoryId", description = "异常货箱ID") Long abnormalInventoryId,
			@Parameter(name = "reson", description = "处置原因") Integer reson,
			@Parameter(name = "handleDate", description = "处置时间") String handleDate,
			@Parameter(name = "handleRemark", description = "处置说明") String handleRemark
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "异常跟踪列表")
	public PageList<AbnormalTrackDetail> inquireAbnormalTaskPageList(
			@Parameter(name = "abnormalId", description = "异常信息ID") Long abnormalId,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询异常信息明细")
	public AbnormalDetail inquireAbnormalDetail(
			@Parameter(name = "abnormalId", description = "异常ID") Long abnormalId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询异常信息列表")
	public PageList<AbnormalLineInfo> inquireAbnormalPageList(
			@Parameter(name = "abnormalId", description = "异常ID", nullable = true) Long[] abnormalIds,
			@Parameter(name = "enterpriseId", description = "﻿融资企业ID", nullable = true) Long enterpriseId,
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId,
			@Parameter(name = "handleState", description = "处理状态 1:未处理/2:/已接受/3:调查中/4:处理完毕", nullable = true) Integer handleState,
			@Parameter(name = "startDate", description = "上报开始时间", nullable = true) String startDate,
			@Parameter(name = "endDate", description = "上报结束时间", nullable = true) String endDate,
			@Parameter(name = "financeNumber", description = "融资编号", nullable = true) String financeNumber,
			@Parameter(name = "abnormalState", description = "异常类别 0:未知/1:货损/2:丢失", nullable = true) Integer abnormalState,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);
	
}
